﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace LeanEngine.Reflection
{
    public static class ReflectionCaches
    {
        #region Constructor Members

        static ReflectionCaches()
        {
            MethodInvokerCache = new MethodInvokerCache();
            PropertyAccessorCache = new PropertyAccessorCache();
            FieldAccessorCache = new FieldAccessorCache();
            ConstructorInvokerCache = new ConstructorInvokerCache();
            EmitConstructorInvokerCache = new EmitConstructorInvokerCache();
        }

        #endregion

        #region PropertyInfo Members

        public static IReflectionCache<MethodInfo, IMethodInvoker> MethodInvokerCache { get; set; }

        public static IReflectionCache<PropertyInfo, IPropertyAccessor> PropertyAccessorCache { get; set; }

        public static IReflectionCache<FieldInfo, IFieldAccessor> FieldAccessorCache { get; set; }

        public static IReflectionCache<ConstructorInfo, IConstructorInvoker> ConstructorInvokerCache { get; set; }

        public static IReflectionCache<Type, IConstructorInvoker> EmitConstructorInvokerCache { get; set; }

        #endregion
    }
}
